<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
     template="TemplateFrontEnd.xhtml">
<ui:define name="title">paiment</ui:define>
<ui:define name="body">

<div class="searchbid">

 <p:tabView>
        
        <p:tab title="By Road">
        <h:form>
       
         <h:panelGrid columns="3" cellpadding="5" style="clear: both;margin: auto;">
         
          <p:selectOneMenu  id="countryu" value="#{searchFreightMB.idC}" style="width:150px"   >
                <p:ajax listener="#{searchFreightMB.onCountryChange(0)}" update="Stateu,cityu" />
                <f:selectItem itemLabel="pickup Country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
	
	  <p:selectOneMenu id="Stateu" value="#{searchFreightMB.idS}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(0)}" update="cityu" />
                 <f:selectItem itemLabel="pickup state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtat}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
            </p:selectOneMenu>
          
            
          
		  <p:selectOneMenu id="cityu" value="#{searchFreightMB.idCi}" style="width:150px"   >
                <f:selectItem itemLabel="pickup city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVille}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            

         <p:selectOneMenu id="countryc" value="#{searchFreightMB.idCcm}" style="width:150px"   >
                <p:ajax listener="#{searchFreightMB.onCountryChange(1)}" update="Statec,cityc" />
                <f:selectItem itemLabel="delivery country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
           
	 
	 
	     <p:selectOneMenu id="Statec" value="#{searchFreightMB.idScm}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(1)}" update="cityc" />
                 <f:selectItem itemLabel="delivery state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatcm}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
          </p:selectOneMenu>
          
            
		
		  <p:selectOneMenu id="cityc" value="#{searchFreightMB.idCicm}" style="width:150px"  >
                <f:selectItem itemLabel="delivery city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVillecm}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
            <p:outputLabel  value="Date filter (from / till)" />
            <p:calendar value="#{searchFreightMB.dateDebut}" />
            <p:calendar value="#{searchFreightMB.datefin}" />
            
            
            <p:selectOneMenu value="#{searchFreightMB.urgent}">
            	 <f:selectItem itemLabel="select urgence" itemValue="" noSelectionOption="true"  />
            	 <f:selectItem itemLabel="urgent" itemValue="true"  />
            	 <f:selectItem itemLabel="not urgente" itemValue="false"  />
            </p:selectOneMenu>
            
            <p:selectOneMenu value="#{searchFreightMB.idCategory}"  >
            	 <f:selectItem itemLabel="select category" itemValue="" noSelectionOption="true" />
            	 <f:selectItems var="a" value="#{searchFreightMB.listeSubCategory()}" itemLabel="#{a.intitule}" itemValue="#{a.idSubCategorie}"/>
            </p:selectOneMenu>
            
       <br/>
       
         <p:commandButton value="Search" update="byRoad" icon="ui-icon-check" />
          
            
            
        </h:panelGrid>
        <br/> <br/> <br/>
          <p:dataTable id="byRoad" var="car" value="#{searchFreightMB.listeoffres(0)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
          <p:column headerText="id" >
          <p:outputLabel value="#{car.idOffre}" />
          </p:column>    
                
           <p:column headerText="Transportation Description" >
           
           <p:outputLabel value="#{car.description}" />
          </p:column>
          
           <p:column headerText="Load photo" >
          </p:column> 
          
           <p:column headerText="Loading place" >
           <p:outputLabel value="#{car.villeDepart.intitule}" />
          </p:column> 
          
           <p:column headerText="bid offer" >
           <p:outputLabel value="#{car.prix_desire}" />
          </p:column>             
        
            <p:column headerText="Offloading place" >
            <p:outputLabel value="#{car.villeArrive.intitule}" />
          </p:column> 
          
           <p:column headerText="loading date" >
           <p:outputLabel value="#{car.date_Chargement}" />
          </p:column> 
          
          
           <p:column headerText="Distance calculation" >
          </p:column>
          
          
          <p:column  >
          <p:commandButton ajax="false" icon="ui-icon-search" action="#{infoOffreMB.voir(car.idOffre)}" />
          </p:column>
          
        </p:dataTable>
        
        </h:form>
        </p:tab>
        
        <p:tab title="By Rail" >
        <h:form>
         <p:selectOneMenu   value="#{searchFreightMB.typeR}"  style="width:150px"  >
              <p:ajax listener="#{searchFreightMB.onChangeType(0)}" update="rail" />
           <f:selectItem itemLabel="select type" itemValue="" noSelectionOption="true" />
        	<f:selectItem  itemValue="DoorToDoor" itemLabel="Door To Door" />
            <f:selectItem  itemValue="DoorToStation" itemLabel="Door to station" />
            <f:selectItem  itemValue="StationToDoor" itemLabel="Station to door" />
            <f:selectItem  itemValue="StationToStation" itemLabel="Station to station" />
        </p:selectOneMenu>
        
      <p:panel id="rail">
        <h:panelGrid rendered="#{searchFreightMB.redredPRail}" columns="4" cellpadding="5" style="clear: both;margin: auto;"  >
       
        <p:selectOneMenu   id="countryu1" value="#{searchFreightMB.idCRa}" style="width:150px"   >
        
                <p:ajax listener="#{searchFreightMB.onCountryChange(2)}" update="Stateu1,garep,cityu1" />
                <f:selectItem itemLabel=" pickup Country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
                
        </p:selectOneMenu>
            
	
	  <p:selectOneMenu  id="Stateu1" value="#{searchFreightMB.idSRa}" style="width:150px"  >
              
               <p:ajax listener="#{searchFreightMB.onStateChange(2)}" update="cityu1,garep" />
                 <f:selectItem itemLabel="pickup state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatRa}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
                
      </p:selectOneMenu>
          
            
          
	<p:selectOneMenu  id="cityu1" value="#{searchFreightMB.idCiRa}" style="width:150px"   >
		        <p:ajax listener="#{searchFreightMB.onchangeCity(0)}" update="garep" />
                <f:selectItem itemLabel=" pickup city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVilleRa}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
                
    </p:selectOneMenu>
            
             <p:selectOneMenu rendered="#{searchFreightMB.redredSPRail}" id="garep" value="#{searchFreightMB.idPRail}"  style="width:150px"  >
            
                <f:selectItem itemLabel="pickup station" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeGareP}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
                
         </p:selectOneMenu> 
            
           </h:panelGrid>
            
            
           
     
       
         <h:panelGrid rendered="#{searchFreightMB.redredDRail}" columns="4" cellpadding="5" style="clear: both;margin: auto;">
         
          <p:selectOneMenu id="countryc1" value="#{searchFreightMB.idCcmRa}" style="width:150px"   >
          
                <p:ajax listener="#{searchFreightMB.onCountryChange(3)}" update="Statec1,gared,cityc1" />
                <f:selectItem itemLabel="Delivery country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
                
            </p:selectOneMenu>
            
	     <p:selectOneMenu id="Statec1" value="#{searchFreightMB.idScmRa}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(3)}" update="cityc1,gared" />
                 <f:selectItem itemLabel="Delivery state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatcmRa}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
          </p:selectOneMenu>
          
            
		
		  <p:selectOneMenu id="cityc1" value="#{searchFreightMB.idCicmRa}" style="width:150px"  >
		  <p:ajax listener="#{searchFreightMB.onchangeCity(0)}" update="gared" />
                <f:selectItem itemLabel="Delivery city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVillecmRa}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>  
            
          <p:selectOneMenu rendered="#{searchFreightMB.redredSDRail}" id="gared" value="#{searchFreightMB.idDRail}"  style="width:150px"  >
         
                <f:selectItem itemLabel="delivery station" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeGareD}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
                
         </p:selectOneMenu> 
            
            </h:panelGrid>
          
            
            
            
         
         
             
         <br/>
         
         <h:panelGrid columns="3" cellpadding="5" style="clear: both;margin: auto;">
         
           <p:outputLabel  value="Date filter (from / till)" />
            <p:calendar value="#{searchFreightMB.dateDebutRa}" />
            <p:calendar value="#{searchFreightMB.datefinRa}" />
            
            <p:selectOneMenu style="width:150px" value="#{searchFreightMB.urgentRa}" >
            
            	 <f:selectItem itemLabel="select urgence" itemValue="" noSelectionOption="true" />
            	 <f:selectItem itemLabel="urgent" itemValue="true"  />
            	 <f:selectItem itemLabel="not urgente" itemValue="false"  />
            	 
            </p:selectOneMenu>
            
            <p:selectOneMenu value="#{searchFreightMB.idCategoryRa}" style="width:150px">
               
            	 <f:selectItem itemLabel="select category" itemValue="" noSelectionOption="true" />
            	 <f:selectItems var="a" value="#{searchFreightMB.listeSubCategory()}" itemLabel="#{a.intitule}" itemValue="#{a.idSubCategorie}"/>
            	 
            </p:selectOneMenu>
         
                  <p:commandButton icon="ui-icon-check"  value="Search" update="byRail"  />
	      
       </h:panelGrid>
       </p:panel>
       
        <br/> <br/> <br/>
          <p:dataTable id="byRail" var="car" value="#{searchFreightMB.listeoffres(1)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
          <p:column headerText="id" >
          <p:outputLabel value="#{car.idOffre}" />
          </p:column>    
                
           <p:column headerText="Transportation Description" >
           
           <p:outputLabel value="#{car.description}" />
          </p:column>
          
           <p:column headerText="Load photo" >
          </p:column> 
          
           <p:column headerText="Loading place" >
           <p:outputLabel value="#{car.villeDepart.intitule}" />
          </p:column> 
          
           <p:column headerText="bid offer" >
           <p:outputLabel value="#{car.prix_desire}" />
          </p:column>             
        
            <p:column headerText="Offloading place" >
            <p:outputLabel value="#{car.villeArrive.intitule}" />
          </p:column> 
          
           <p:column headerText="loading date" >
           <p:outputLabel value="#{car.date_Chargement}" />
          </p:column> 
          
          
           <p:column headerText="Distance calculation" >
          </p:column>
          
          
          <p:column  >
          <p:commandButton ajax="false" icon="ui-icon-search" action="#{infoOffreMB.voir(car.idOffre)}" />
          </p:column>
        
        </p:dataTable>
        </h:form>
        </p:tab>
        <p:tab title="By Sea" >
        <h:form>
        <p:selectOneMenu value="#{searchFreightMB.typeS}"  style="width:150px" >
        <p:ajax listener="#{searchFreightMB.onChangeType(1)}" update="sea" />
         <f:selectItem itemLabel="select type" itemValue="" noSelectionOption="true" />
        	<f:selectItem  itemValue="DoorToDoor" itemLabel="Door To Door" />
            <f:selectItem  itemValue="DoorToPort" itemLabel="Door to Port" />
            <f:selectItem  itemValue="PortToDoor" itemLabel="Port to door" />
            <f:selectItem  itemValue="PortToPort" itemLabel="Port to Port" />
        </p:selectOneMenu>
        
      <p:panel id="sea" >
        <h:panelGrid rendered="#{searchFreightMB.redredPSea}" columns="4" cellpadding="5" style="clear: both;margin: auto;">
       
            <p:selectOneMenu  id="countryu2" value="#{searchFreightMB.idCSe}"  style="width:150px"   >
                <p:ajax listener="#{searchFreightMB.onCountryChange(4)}" update="Stateu2,portp,cityu2" />
                <f:selectItem itemLabel=" pickup Country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
	
	      <p:selectOneMenu id="Stateu2" value="#{searchFreightMB.idSSe}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(4)}" update="cityu2,portp" />
                 <f:selectItem itemLabel="pickup state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatSe}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
            </p:selectOneMenu>
          
            
          
		  <p:selectOneMenu id="cityu2" value="#{searchFreightMB.idCiSe}" style="width:150px"   >
		  <p:ajax listener="#{searchFreightMB.onchangeCity(1)}" update="portp" />
                <f:selectItem itemLabel=" pickup city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVilleSe}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
            <p:selectOneMenu rendered="#{searchFreightMB.redredSPSea}" id="portp" style="width:150px"  >
                <f:selectItem itemLabel="pickup port" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listePortP}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
         </p:selectOneMenu>
         
         </h:panelGrid>
        
         
          
         
       
         
        
         <h:panelGrid rendered="#{searchFreightMB.redredDSea}" columns="4" cellpadding="5" style="clear: both;margin: auto;">
         
          <p:selectOneMenu id="countryc2" value="#{searchFreightMB.idCcmSe}" style="width:150px"   >
                <p:ajax listener="#{searchFreightMB.onCountryChange(5)}" update="Statec2,portd,cityc2" />
                <f:selectItem itemLabel="Delivery country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
	     <p:selectOneMenu id="Statec2" value="#{searchFreightMB.idScmSe}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(5)}" update="cityc2,portd" />
                 <f:selectItem itemLabel="Delivery state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatcmSe}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
          </p:selectOneMenu>
          
            
		
		  <p:selectOneMenu id="cityc2" value="#{searchFreightMB.idCicmSe}" style="width:150px"  >
		  
		     <p:ajax listener="#{searchFreightMB.onchangeCity(1)}" update="portd" />
                <f:selectItem itemLabel="Delivery city"  itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVillecmSe}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
            
              <p:selectOneMenu rendered="#{searchFreightMB.redredSDSea}" id="portd" style="width:150px"  >
                <f:selectItem itemLabel="delivery port" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listePortD}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
         </p:selectOneMenu> 
             </h:panelGrid>
            
           
        
         <h:panelGrid  columns="3" cellpadding="5" style="clear: both;margin: auto;">
           <p:outputLabel value="Date filter (from / till)" />
            <p:calendar value="#{searchFreightMB.dateDebutSe}" />
            <p:calendar value="#{searchFreightMB.datefinSe}" />
       
            <p:selectOneMenu  value="#{searchFreightMB.urgentSe}" style="width:150px">
            	 <f:selectItem itemLabel="select urgence" itemValue="" noSelectionOption="true" />
            	 <f:selectItem itemLabel="urgent" itemValue="true"  />
            	 <f:selectItem itemLabel="not urgente" itemValue="false"  />
            </p:selectOneMenu>
            
            <p:selectOneMenu value="#{searchFreightMB.idCategorySe}" style="width:150px">
            	 <f:selectItem itemLabel="select category" itemValue="" noSelectionOption="true" />
            	 <f:selectItems var="a" value="#{searchFreightMB.listeSubCategory()}" itemLabel="#{a.intitule}" itemValue="#{a.idSubCategorie}"/>
            </p:selectOneMenu><br/>
         <p:commandButton value="Search" update="bySea" icon="ui-icon-check" />
        </h:panelGrid>
        
        </p:panel>
         <br/> <br/> <br/>
          <p:dataTable  id="bySea" var="car" value="#{searchFreightMB.listeoffres(2)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
          <p:column headerText="id" >
          <p:outputLabel value="#{car.idOffre}" />
          </p:column>    
                
           <p:column headerText="Transportation Description" >
           
           <p:outputLabel value="#{car.description}" />
          </p:column>
          
           <p:column headerText="Load photo" >
          </p:column> 
          
           <p:column headerText="Loading place" >
           <p:outputLabel value="#{car.villeDepart.intitule}" />
          </p:column> 
          
           <p:column headerText="bid offer" >
           <p:outputLabel value="#{car.prix_desire}" />
          </p:column>             
        
            <p:column headerText="Offloading place" >
            <p:outputLabel value="#{car.villeArrive.intitule}" />
          </p:column> 
          
          <p:column headerText="loading date" >
           <p:outputLabel value="#{car.date_Chargement}" />
          </p:column> 
          
          
           <p:column headerText="Distance calculation" >
          </p:column>
          
          
          <p:column  >
          <p:commandButton ajax="false" icon="ui-icon-search" action="#{infoOffreMB.voir(car.idOffre)}" />
          </p:column>
        
        </p:dataTable>
        </h:form>
        </p:tab>
        
        
        
        
        
        
        <p:tab title="By Air">
        <h:form>
          <p:selectOneMenu value="#{searchFreightMB.typeAi}" style="width:150px" >
          <p:ajax listener="#{searchFreightMB.onChangeType(2)}" update="air" />
           <f:selectItem itemLabel="select type" itemValue="" noSelectionOption="true" />
        	<f:selectItem  itemValue="DoorToDoor" itemLabel="Door To Door" />
            <f:selectItem  itemValue="DoorToAirPort" itemLabel="Door to air port" />
            <f:selectItem  itemValue="AirPortToDoor" itemLabel=" Air port to door" />
            <f:selectItem  itemValue="AirPortToAirPort" itemLabel="Air Port to air port" />
          </p:selectOneMenu>
          
        <p:panel id="air" >
       
        <h:panelGrid rendered="#{searchFreightMB.redredPAir}" columns="4" cellpadding="5" style="clear: both;margin: auto;">
       
            <p:selectOneMenu  id="countryu3"  style="width:150px" value="#{searchFreightMB.idCAi}"  >
                <p:ajax listener="#{searchFreightMB.onCountryChange(6)}" update="Stateu3,airportp,cityu3" />
                <f:selectItem itemLabel=" pickup Country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
	
	      <p:selectOneMenu id="Stateu3" value="#{searchFreightMB.idSAi}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(6)}" update="cityu3,airportp" />
                 <f:selectItem itemLabel="pickup state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatAi}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
            </p:selectOneMenu>
          
            
          
		  <p:selectOneMenu id="cityu3" value="#{searchFreightMB.idCiAi}" style="width:150px"   >
		  
		  <p:ajax listener="#{searchFreightMB.onchangeCity(2)}" update="airportp" />
                <f:selectItem itemLabel=" pickup city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVilleAi}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
                        <p:selectOneMenu rendered="#{searchFreightMB.redredSPAir}" id="airportp"  style="width:150px"  >
                <f:selectItem itemLabel="pickup air port" itemValue="" noSelectionOption="true" />
                 <f:selectItems value="#{searchFreightMB.listeAirP}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
           </p:selectOneMenu> 
            </h:panelGrid>
            
            

            
      
         <h:panelGrid rendered="#{searchFreightMB.redredDAir}" columns="4" cellpadding="5" style="clear: both;margin: auto;">
          <p:selectOneMenu id="countryc3" value="#{searchFreightMB.idCcmAi}" style="width:150px"   >
                <p:ajax listener="#{searchFreightMB.onCountryChange(7)}" update="Statec3,airportd,cityc3" />
                <f:selectItem itemLabel="Delivery country" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listPays}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
            
	     <p:selectOneMenu id="Statec3" value="#{searchFreightMB.idScmAi}" style="width:150px"  >
               <p:ajax listener="#{searchFreightMB.onStateChange(7)}" update="cityc3,airportd" />
                 <f:selectItem itemLabel="Delivery state" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeEtatcmAi}"  var="s" itemValue="#{s.idEtat}"  itemLabel="#{s.intitule}"/>
          </p:selectOneMenu>
          
            
		
		  <p:selectOneMenu id="cityc3" value="#{searchFreightMB.idCicmAi}" style="width:150px"  >
		  
		  <p:ajax listener="#{searchFreightMB.onchangeCity(2)}" update="airportd" />
		  
                <f:selectItem itemLabel="Delivery city" itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{searchFreightMB.listeVillecmAi}" var="a" itemValue="#{a.idVille}" itemLabel="#{a.intitule}" />
            </p:selectOneMenu>
                         <p:selectOneMenu rendered="#{searchFreightMB.redredSDAir}" id="airportd" style="width:150px"  >
                <f:selectItem itemLabel="delivery air port" itemValue="" noSelectionOption="true" />
                 <f:selectItems value="#{searchFreightMB.listeAiD}" var="a"  itemLabel="#{a.intitule}" itemValue="#{a.idStation}" />
         </p:selectOneMenu>
            </h:panelGrid>
           
            
            
           
           <h:panelGrid columns="3" cellpadding="5" style="clear: both;margin: auto;" >
           
           <p:outputLabel  value="Date filter (from / till)" />
            <p:calendar value="#{searchFreightMB.dateDebutAi}" />
            <p:calendar value="#{searchFreightMB.datefinAi}" />
          

            <p:selectOneMenu  value="#{searchFreightMB.urgentAi}" style="width:150px">
            	 <f:selectItem itemLabel="select urgence" itemValue="" noSelectionOption="true" />
            	 <f:selectItem itemLabel="urgent" itemValue="true"  />
            	 <f:selectItem itemLabel="not urgente" itemValue="false"  />
            	   </p:selectOneMenu>
                <p:selectOneMenu value="#{searchFreightMB.idCategoryAi}" style="width:150px">
            	 <f:selectItem itemLabel="select category" itemValue="" noSelectionOption="true" />
            	 <f:selectItems var="a" value="#{searchFreightMB.listeSubCategory()}" itemLabel="#{a.intitule}" itemValue="#{a.idSubCategorie}"/>
            </p:selectOneMenu><br/>
            
             <p:commandButton value="Search" update="byAir" icon="ui-icon-check" />
             
           </h:panelGrid>
           
           </p:panel>
            <br/> <br/> <br/>
          <p:dataTable id="byAir" var="car" value="#{searchFreightMB.listeoffres(3)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
          <p:column headerText="id" >
          <p:outputLabel value="#{car.idOffre}" />
          </p:column>    
                
           <p:column headerText="Transportation Description" >
           
           <p:outputLabel value="#{car.description}" />
          </p:column>
          
           <p:column headerText="Load photo" >
          </p:column> 
          
           <p:column headerText="Loading place" >
           <p:outputLabel value="#{car.villeDepart.intitule}" />
          </p:column> 
          
           <p:column headerText="bid offer" >
           <p:outputLabel value="#{car.prix_desire}" />
          </p:column>             
        
            <p:column headerText="Offloading place" >
            <p:outputLabel value="#{car.villeArrive.intitule}" />
          </p:column> 
          
           <p:column headerText="loading date" >
           <p:outputLabel value="#{car.date_Chargement}" />
          </p:column> 
          
          
           <p:column headerText="Distance calculation" >
          </p:column>
          
          
          <p:column  >
          <p:commandButton ajax="false" icon="ui-icon-search" action="#{infoOffreMB.voir(car.idOffre)}" />
          </p:column>
        
        </p:dataTable>
        </h:form>
        </p:tab>
 </p:tabView>
</div>

</ui:define>
</ui:composition>